package com.njwb.day02;

public class Test01 {
    public static void main(String[] args) {
        //switch:判断一个整数是偶数还是奇数
        /*if(i%2==0){
            System.out.println(i+"是偶数");
        }
        if(i%2==1){
            System.out.println(i+"是奇数");
        }*/
        int num=20;
        switch (num%2){
            case 0:
                System.out.println(num+"是偶数");
                break;
            case 1:
                System.out.println(num+"是奇数");
                break;
            default:
                System.out.println("你给定的数值不符合要求");
                break;

        }



    }
}
